#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int a = 0;
	scanf("%d\n", a);
	while (a % 10)
			printf("%d\n", a);

	return 0;
}